#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int Fib(int y) {
	if (y == 1)
		return 1;
	else if (y == 2)
		return 1;
	else {
		int a = 1;
		int b = 1;
		int c = 0;
		int count = 0;
		do {
			c = a + b;
			a = b;
			b = c;
			count++;
		}while(count < y - 2);
		return c;
	}
	
}

int main() {
	int x = 0;
	scanf("%d", &x);
	int ret=Fib(x);
	printf("%d", ret);
	return 0;
}